package com.cq.hd.member.controller;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.common.response.Result;
import com.cq.hd.common.response.ResultGenerator;
import com.cq.hd.member.api.TbCommissionBillApi;
import com.cq.hd.member.api.dto.AdminCommissionBillDto;
import com.cq.hd.member.api.dto.CommissionBillDto;
import com.cq.hd.member.api.vo.AdminCommissionBillPageVo;
import com.cq.hd.member.api.vo.CommissionBillVo;
import com.cq.hd.member.service.TbCommissionBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 经纪人佣金流水表 前端控制器
 * </p>
 *
 * @author mYunYu
 * @since 2024-01-28
 */
@RestController
public class TbCommissionBillController implements TbCommissionBillApi {

    @Autowired
    private TbCommissionBillService commissionBillService;

    @Override
    public Result<List<CommissionBillVo>> listCommissionBill(CommissionBillDto commissionBillDto) {
        return ResultGenerator.success(commissionBillService.listCommissionBill(commissionBillDto));
    }

    @Override
    public Result<Page<AdminCommissionBillPageVo>> pageCommissionBill(AdminCommissionBillDto adminCommissionBillDto) {
        return ResultGenerator.success(commissionBillService.pageCommissionBill(adminCommissionBillDto));
    }
}
